/*
 * BGMatrix.h
 *
 *  Created on: 19/04/2010
 *      Author: Nenem
 */

#ifndef BGMATRIX_H_
#define BGMATRIX_H_

#include <fstream>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
#include "Tools.h"

enum EnumTerrainType{NORMAL, GRASS, STAIRS};

struct Tile{
	bool rigid;
	EnumTerrainType terrainType;
};

class BGMatrix {
	int width;
	int height;
	Tile *matrix;
public:
	BGMatrix();
	BGMatrix(int width, int height);
	virtual ~BGMatrix();
	int get(int i, int j);
	EnumTerrainType getTerrain(int i, int j);
	void set(int i, int j, int value, string terrain);
	bool loadMapFile(string arqName);
	void print();

    int getHeight() const
    {
        return height;
    }

    int getWidth() const
    {
        return width;
    }

    void setHeight(int height)
    {
        this->height = height;
    }

    void setWidth(int width)
    {
        this->width = width;
    }

};

#endif /* BGMATRIX_H_ */
